home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-10-26 | 4.9 KB | 160 lines | [TEXT/MPS ] |
- .\"
- .\" Startup.man
- .\"
- .\" Extended Tcl binary file search command.
- .\"----------------------------------------------------------------------------
- .\" Copyright 1992-1993 Karl Lehenbauer and Mark Diekhans.
- .\"
- .\" Permission to use, copy, modify, and distribute this software and its
- .\" documentation for any purpose and without fee is hereby granted, provided
- .\" that the above copyright notice appear in all copies. Karl Lehenbauer and
- .\" Mark Diekhans make no representations about the suitability of this
- .\" software for any purpose. It is provided "as is" without express or
- .\" implied warranty.
- .\"----------------------------------------------------------------------------
- .\" $Id: Startup.3,v 2.7 1993/07/20 08:35:45 markd Exp $
- .\"----------------------------------------------------------------------------
- .\"
- .TH "Tcl_Startup" TCL "" "Tcl"
- .ad b
- .SH NAME
- Tcl_ShellEnvInit, Tcl_Startup, Tcl_ProcessInitFile - Extended Tcl Shell startup facilities.
- '
- .SH SYNOPSIS
- .nf
- .ft CW
- #include "tclExtend.h"
-
- extern char *tclAppName;
- extern char *tclAppLongname;
- extern char *tclAppVersion;
-
- int
- Tcl_ShellEnvInit (Tcl_Interp *interp,
- unsigned options);
-
- void
- Tcl_Startup (Tcl_Interp *interp,
- unsigned options);
- int argc,
- const char **argv);
-
- int
- Tcl_ProcessInitFile (Tcl_Interp *interp,
- char *dirEnvVar,
- char *dir,
- char *version1,
- char *version2,
- char *initFile);
- .ft R
- .fi
- .SH DESCRIPTION
- These functions control the startup of the Extended Tcl shell and related
- applications.
- '
- .SS tclAppName
- The application name to be returned by the \fBinfox\fR
- command. This should be a short mnemonic. If a special value is
- desired, it must be set before one of the startup procedures are called.
- '
- .SS tclAppLongname
- The application long name to be returned by the \fBinfox\fR command.
- This should be a natural language string. If a special value is desired, it
- must be set before one of the startup procedures are called.
- '
- .SS tclAppVersion
- The application version string to be returned by the \fBinfox\fR command. If
- a special value is desired, it must be set before one of the startup
- procedures are called.
- '
- .SS Tcl_ShellEnvInit
- .PP
- Initialize the Tcl shell environment. Including evaluating the standard
- TclX init file and setting various variable and values for infox to access.
- If this is an interactive Tcl session, SIGINT is set to generate a Tcl
- error. This routine is provided for the wishx shell or similar
- environments where the Tcl_Startup command line parsing is not desired.
- .PP
- Parameters:
- .RS 2
- \fBo \fIinterp\fR - A pointer to the interpreter.
- .br
- \fBo \fIoptions\fR - Flags to control the behavior of this routine, the
- following option is supported:
- .RE
- .br
- .RS 5
- .br
- \fB- TCLSH_INTERACTIVE\fR - Set interactiveSession to 1.
- .br
- \fB- TCLSH_QUICK_STARTUP\fR - Don't source the Tcl inititialization file.
- .br
- \fB- TCLSH_ABORT_STARTUP_ERR\fR - If set, abort the process if an error occurs.
- .br
- \fB- TCLSH_NO_STACK_DUMP\fR - If an error occurs, don't dump out the procedure
- call stack, just print an error message.
- .RE
- .PP
- Notes:
- .RS 2
- The variables \fBtclAppName\fR, \fBtclAppLongname\fR, \fBtclAppVersion\fR
- must be set before calling thus routine if special values are desired.
- .RE
- .PP
- Returns:
- .RS 2
- \fBTCL_OK\fR if all is ok, \fBTCL_ERROR\fR if an error occurred.
- .RE
- '
- .SS Tcl_Startup
- .PP
- Initializes the Tcl extended environment. This function processes the
- standard command line arguments and locates the Tcl initialization file.
- It then sources the initialization file.
- Either an interactive command loop is created or a Tcl script file
- is executed depending on the command line. This functions calls
- Tcl_ShellEnvInit, so it should not be called separately.
- .PP
- Parameters
- .RS 2
- \fBo \fIinterp\fR - A pointer to the interpreter.
- .br
- \fBo \fIoptions\fR - Options that control startup behavior. None are currently
- defined.
- .br
- \fBo \fIargc, argv\fR - Arguments passed to main for the command line.
- .RE
- .PP
- Notes:
- .RS 2
- The variables \fBtclAppName\fR, \fBtclAppLongname\fR, \fBtclAppVersion\fR
- must be set before calling thus routine if special values are desired.
- .RE
- '
- .SS Tcl_ProcessInitFile
- .PP
- Find and evaludate a Tcl init file. This assumes that the init file
- lives in a master directory and appends the directory name to the
- "auto_path" variable.
- .PP
- Parameters:
- .RS 2
- \fBo \fIinterp\fR - A pointer to the interpreter
- .br
- \fBo dirEnvVar (I) - Environment variable used to override the directory path.
- .br
- \fBo dir\fR (I) - The directory name.
- \fBo version1, version2\fR - Two part version number forming a directory under
- dir. Either maybe NULL.
- .br
- \fBo initFile (I) - The name of the init file, which is found either in the
- directory pointed to by envVar or by the directory formed from dir1,
- dir2 & dir3.
- .RE
- .PP
- Returns:
- .RS 2
- \fBTCL_OK\fR if all is ok, \fBTCL_ERROR\fR if an error occurred.
- .RE
- '
-